package com.zhao.demo.unbound.demo03_source.sample04_self

import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment

/**
 * Description: 使用自定义的source实时读取指定的日志文件中的数据,送往flink进行实时的处理,并显示结果(代码优化)<br/>
 * Copyright (c) ，2020 ， 赵 <br/>
 * This program is protected by copyright laws. <br/>
 * Date： 2020/11/26 17:44
 *
 * @author 柒柒
 * @version : 1.0
 */

object ReadDataFromSelfSourceDemo2 {
  def main(args: Array[String]): Unit = {
    //1.环境
    val env: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment

    //2.读取source,处理,显示
    import org.apache.flink.api.scala._
    env.addSource(new MySource).print("自定义source优化之后->")

    //3.启动
    env.execute()

  }
}





